import request from '@/utils/request'

export default{
    // 添加课程信息
    addCourseInfo(courseInfo){
        return request({
            // url: '/eduservice/study-teacher/pageTeacherWrapper/'+current+'/'+size,
            url:`/eduservice/study-course/addCourseInfo`,
            method: 'post',
            data:courseInfo
        })
    },
    //根据课程id查询
    getChapter(id){
        return request({
            // url: '/eduservice/study-teacher/pageTeacherWrapper/'+current+'/'+size,
            url:`/eduservice/study-course/getCourseInfo/${id}`,
            method: 'get'
        })
    },
    //修改课程信息
    updateCourseInfo(courseInfo){
        return request({
            // url: '/eduservice/study-teacher/pageTeacherWrapper/'+current+'/'+size,
            url:`/eduservice/study-course/updateCourseInfo`,
            method: 'post',
            data:courseInfo
        })
    },

    //课程信息确认 issue界面
    getCourseInfoIssue(courseId){
        return request({
            // url: '/eduservice/study-teacher/pageTeacherWrapper/'+current+'/'+size,
            url:`/eduservice/study-course/getCourseIssueVo/${courseId}`,
            method: 'get'
        })
    },

    //课程最终发布
    courseIssue(id){
        return request({
            // url: '/eduservice/study-teacher/pageTeacherWrapper/'+current+'/'+size,
            url:`/eduservice/study-course/courseIssue/${id}`,
            method: 'post'
        })
    },

    //课程列表显示
    getCourseListPage(current,size,searchCourse){
        return request({
            url: `/eduservice/study-course/pageCourseWrapper/${current}/${size}`,
            method: 'post',
            data: searchCourse
        })
    },

    //删除课程
    deleteCourseById(id){
        return request({
            url: `/eduservice/study-course/deleteCourse/${id}`,
            method: 'delete'
        })
    }

}
